<template>
	<view class="search-container" :style="{'background-color': bgc}">
    <view class="search-box" :style="{'border-radius': radius + 'px'}" @click="searchHandler">
        <uni-icons type="search" size="17"></uni-icons>
        <text class="placeholder">搜索</text>
    </view>
	</view>
</template>

<script>
	export default {
    props:{
      bgc:{
        type:String,
        default:'#c00000'
      },
      radius:{
        type:Number,
        default:18
      }
    },
		data() {
			return {
				
			};
		},
    methods:{
      searchHandler(){
        this.$emit('click')
      }
    }
	}
</script>

<style lang="scss">
.search-container{
  background-color: #c00000;
  height: 50px;
  display: flex;
  align-items: center;
  .search-box{
    background-color: #fff;
    height: 36px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    .placeholder{
      font-size: 15px;
      padding-left: 10px;
    }
  }
}
</style>
